<?php if (!defined('THINK_PATH')) exit();?><!doctype html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>我的博客</title>
    <link rel="stylesheet" href="__STATIC__/bs/css/bootstrap.min.css">
</head>
<body>
<!-- Static navbar -->
<div class="navbar navbar-default navbar-static-top" role="navigation">
    <div class="container">

        <div class="navbar-collapse collapse">
            <ul class="nav navbar-nav" id="navBar">
                <li><a href="<?php echo U('/Index');?>">文章列表</a></li>

            </ul>

            <ul class="nav navbar-nav navbar-left">
                <li><a href="<?php echo U('/Public/login');?>">管理员入口</a></li>
            </ul>
            <ul class="nav navbar-nav navbar-right">
                <li><a href="<?php echo U('/Public/logout');?>">注销</a></li>
            </ul>

        </div>
    </div>
</div>

<a href="<?php echo U('insert');?>">写文章</a>
<table class="table table-striped">
    <tr>
        <td>标题</td>
        <td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
        <td>最近修改时间</td>
        <td></td>
    </tr>
    <?php if(is_array($articles)): foreach($articles as $key=>$articles): ?><tr>
            <td><a href="Contents/detail/id/<?php echo ($articles["id"]); ?>"><?php echo ($articles["title"]); ?></a></td>
            <td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
            <td><?php echo ($articles["updatetime"]); ?></td>

            <td>&nbsp;
                <a href="Admin/edit/id/<?php echo ($articles["id"]); ?>">编辑</a>&nbsp;
                <a href="Admin/delete/id/<?php echo ($articles["id"]); ?>">删除</a>

            </td>
        </tr><?php endforeach; endif; ?>
</table>